<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>后台管理面板</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    {include file="common/top" /}
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <div class="content-wrapper" style="margin-left: 0 !important;">
        <!--页眉-->
        <section class="content-header">
            <h1>
                <!--首页-->
                <small><i class="fa fa-dashboard"></i> </small>
            </h1>
            <ol class="breadcrumb">
                <!--<li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>-->
                <li class="active"></li>
            </ol>
        </section>
        <!--内容开始-->
        <section class="content">

            <form method="post" id="form_data">
                <!---->
                <div class="row">
                    <div class="col-sm-12 col-xs-12">
                        <div class="box box-body">
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">管理员用户名</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="username" class="form-control"  >
                                    </div>

                                </div>
                            </div>
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">管理员密码</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="password" class="form-control" >
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">是否是超级管理员</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <select name="is_super" class="form-control">
                                            <option  value="1">是</option>
                                            <option  value="2">否</option>
                                        </select>
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">管理员昵称</label>
                                    <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="nickname" class="form-control" >
                                    </div>
                                    <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5 text-center">
                                        <button type="button" class="btn btn-flat btn-primary " id="button">提 交</button>
                                        <button type="button" class="btn btn-flat btn-default" onclick="javascript :history.back(-1)">返 回
                                        </button>
                                    </div>

                                </div>
                            </div>
                        </div>
                        <!-- /.box -->
                    </div>
                </div>
            </form>
    </div>
    <!-- /.row (main row) -->

    </section>
    <!--内容结束-->
</div>
</div>
{include file="common/bottom" /}
<script>
$('#button').click(function () {
    var data = $('#form_data').serialize();
    $.ajax({
        url: "{:url('admin/LoginUser/add')}",
        type: "POST",
        data: data,
        success: function (res) {
            if (res.code == 1) {
                layer.msg(res.msg, {
                    icon: 6,
                    time: 2000
                }, function () {
                    window.location.reload();
                })
            } else {
                layer.open({
                    title: '修改失败！',
                    content: res.msg,
                    icon: 5
                })
            }
        }
    })
})
</script>
<script src="/static/lib/layui/layui/layui.js"></script>
<link rel="stylesheet" href="/static/lib/layui/layui/css/layui.css">


<!--引入JS-->
<script type="text/javascript" src="/static/plugins/webuploader-0.1.5/webuploader.js"></script>
</body>
</html>
